import request from '@/utils/request'

// 查询课件信息列表
export function listCourseware(query) {
  return request({
    url: '/edu/courseware/list',
    method: 'get',
    params: query
  })
}

// 查询课件信息详细
export function getCourseware(coursewareId) {
  return request({
    url: '/edu/courseware/' + coursewareId,
    method: 'get'
  })
}

// 新增课件信息
export function addCourseware(data) {
  return request({
    url: '/edu/courseware',
    method: 'post',
    data: data
  })
}

// 修改课件信息
export function updateCourseware(data) {
  return request({
    url: '/edu/courseware',
    method: 'put',
    data: data
  })
}

// 删除课件信息
export function delCourseware(coursewareId) {
  return request({
    url: '/edu/courseware/' + coursewareId,
    method: 'delete'
  })
}

// 导出课件信息
export function exportCourseware(query) {
  return request({
    url: '/edu/courseware/export',
    method: 'get',
    params: query
  })
}